package com.jingdianjichi.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jingdianjichi.subject.infra.basic.entity.SubjectRadio;
import com.jingdianjichi.subject.infra.basic.service.SubjectRadioService;
import com.jingdianjichi.subject.infra.basic.mapper.SubjectRadioMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
* @author 20432
* @description 针对表【subject_radio(单选信息表)】的数据库操作Service实现
* @createDate 2025-10-03 16:36:38
*/
@Service
public class SubjectRadioServiceImpl extends ServiceImpl<SubjectRadioMapper, SubjectRadio>
    implements SubjectRadioService{

    @Resource
    private SubjectRadioMapper subjectRadioMapper;
    @Override
    public boolean insertBath(List<SubjectRadio> subjectRadioList) {
        Integer count = subjectRadioMapper.insertBatch(subjectRadioList);
        return count > 0;
    }

    @Override
    public List<SubjectRadio> queryBySubjectId(Long subjectId) {
        List<SubjectRadio> subjectRadioList = subjectRadioMapper.queryBySubjectId(subjectId);
        return subjectRadioList;
    }
}




